#include "Core.h"

Core::Core(void)
{
	Surf_Display = NULL;

	Running = true;

	config = new ConfigFile(".\\config\\config.ini");
	config->parse();
}


Core::~Core(void)
{
}

int Core::OnExecute()
{
	if(OnInit() == false)
	{
		return -1;
	}

	SDL_Event Event;

	while(Running)
	{
		while(SDL_PollEvent(&Event))
		{
			OnEvent(&Event);
		}

		OnLoop();
		OnRender();
	}

	OnCleanup();

	return 0;
}
